package com.grad.webstudy.model;

import java.io.Serializable;

public class Collect implements Serializable {
    private Integer id;

    private Integer userId;

    private Integer courseId;

    public Collect(Integer userId, Integer courseId) {
        this.userId = userId;
        this.courseId = courseId;
    }

    public Collect() {
    }

    public Collect(Builder builder) {
        this.id = builder.id;
        this.userId = builder.userId;
        this.courseId = builder.courseId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    @Override
    public String toString() {
        return "Collect{" +
                "id=" + id +
                ", userId=" + userId +
                ", courseId=" + courseId +
                '}';
    }

    public static class Builder {
        private Integer id;

        private Integer userId;

        private Integer courseId;

        public Builder setId(Integer id) {
            this.id = id;
            return this;
        }

        public Builder setUserId(Integer userId) {
            this.userId = userId;
            return this;
        }

        public Builder setCourseId(Integer courseId) {
            this.courseId = courseId;
            return this;
        }

        public Collect build() {
            return new Collect(this);
        }
    }
}